package nowcoder.written_examination.aqy;

import java.math.BigInteger;
import java.util.Scanner;

/**
 * 总结: 我还是比较弱的, 第二题编程 他们的好简单, 我按照定义 究级复杂...
 * @author fance
 * @date 18-6-29 上午10:01
 */

public class Main {
    public static void main(String[] args) {
//a();
    b();
//    c();
    }


    public static void c() {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String s = scanner.nextLine();
            System.out.println(c_core(s));
        }

    }
    private static int c_core(String s) {
        if (s.equals("")) {
            return 0;
        }

        if (s.charAt(0) == '(' && s.charAt(s.length() - 1) == ')') {
            String subStr = s.substring(1,s.length() - 1);
            if (isIegal(subStr)) {
                return c_core(subStr) + 1;
            }
        }

        for (int i = 0; i < s.length(); i++) {
                if (i == s.length() - 1) {
                    continue;
                }
                String pre = s.substring(0,i);
                String last = s.substring(i + 1);
                if (isIegal(pre) && isIegal(last)) {
                    return Math.max(c_core(pre),c_core(last));
                }
        }
        return 1;

    }

    private static boolean isIegal(String s) {
        int cnt = 0;
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if (c == '(') {
                cnt++;
            }
            if (c == ')') {
                cnt--;
            }
            if (cnt < 0) {
                return false;
            }
        }
        return true;
    }
    public static void b() {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int n = scanner.nextInt();
            int m = scanner.nextInt();
            int cnt1 = 0;
            int cnt2 = 0;

            for (int i = 1; i * i <= n; i++) {
                if (i * i <= n) {
                    cnt1++;
                }
            }
            for (int j = 1; j * j <= m; j++) {
                if (j * j <= m) {
                    cnt2++;
                }
            }
            System.out.println(cnt1 * cnt2);
        }

    }


    public static void a() {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {

            int x1 = scanner.nextInt();
            int k1 = scanner.nextInt();
            int x2 = scanner.nextInt();
            int k2 = scanner.nextInt();
            String s1 = String.valueOf(x1);
            String s2 = String.valueOf(x2);
            StringBuilder stringBuilder1 = new StringBuilder();
            for (int i = 0; i < k1; i++) {
                stringBuilder1.append(s1);
            }
            StringBuilder stringBuilder2 = new StringBuilder();
            for (int i = 0; i < k2; i++) {
                stringBuilder2.append(s2);
            }

            BigInteger bigInteger1 = new BigInteger(stringBuilder1.toString());
            BigInteger bigInteger2 = new BigInteger(stringBuilder2.toString());
            if (bigInteger1.compareTo(bigInteger2) == 0) {
                System.out.println("Equal");
            } else if (bigInteger1.compareTo(bigInteger2) > 0) {
                System.out.println("Greater");
            } else {
                System.out.println("Less");
            }
        }

    }
}





/* List<Student> students = new ArrayList<Student>();
       students.add(new Student(10));
       students.add(new Student(18));
       students.add(new Student(15));
       Collections.sort(students);

       for (Student student : students) {
           System.out.println(student);
       }*/
class Student implements Comparable<Student> {
    Integer age;
    public Student(Integer age) {
        this.age = age;
    }
    public int compareTo(Student s) {
        return this.age - s.age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "age=" + age +
                '}';
    }
}